package com.wego.listener;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletContextEvent;
import jakarta.servlet.ServletContextListener;
import jakarta.servlet.annotation.WebListener;

/**
 * @className: WeGoListener
 * @description: 监听器
 * @author: Li Chuanwei
 * @date: 2023/07/11 18:43
 * @Company: Copyright [日期] by [作者或个人]
 **/

@WebListener
public class WeGoListener implements ServletContextListener {

    public WeGoListener() {
    }

    /**
     * 项目启动时调用
     * @param sce
     */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        final ServletContext servletContext = sce.getServletContext();
        servletContext.setAttribute("IMG_SERVER", "http://127.0.0.1:9000/wego");
    }

}
